﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using DrSoftsFrame.Servers;

namespace PreeRegisterDAL
{
    public class MedInfoDAL
    {
        /// <summary>
        /// 获取医院实际就诊量 
        /// </summary>
        /// <returns></returns>
        public static DataSet GetMedInfo(string wid)
        {
            try
            {
                string sqlstr = "";
                sqlstr = string.Format(@"select COUNT(1) num from OPDRegister
                                         where iworkplanid={0} and isnull(bFadeRateFlag,0)=0", wid);

                ClinicDb mydb = new ClinicDb();
                DataSet ds = mydb.ExecuteSelect(sqlstr);
                if (ds == null || ds.Tables.Count < 1)
                {
                    return null;
                }
                ds.Tables[0].TableName = "OPDRegister";
                return ds;

            }
            catch (Exception err)
            {

                throw;
            }
        }
    }
}
